package com.starlink.databaseservice.repository;

import com.starlink.databaseservice.model.Post;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

public interface PostRepository extends JpaRepository<Post,Long> {
    @Query(value = "select * from post where label is null limit 1", nativeQuery = true)
    Post findRandom();
}
